package UniqValueCountTest;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;

public class DriTest {
    public static void main(String[] args) throws   Exception{
        Configuration conf = new Configuration();
//        conf.set("fs.default","hdfs://192.168.0.155:9000");
        Job job = Job.getInstance(conf);

        job.setJarByClass(DriTest.class);
        job.setMapperClass(MapTest.class);

        job.setMapOutputKeyClass(Text.class);
        job.setMapOutputValueClass(Text.class);

        FileInputFormat.setInputPaths(job, "D:\\MP\\UniqValueCount");
        FileOutputFormat.setOutputPath(job,new Path("D:\\MP\\UniqValueCount\\out"));
        boolean b = job.waitForCompletion(true);
        System.exit(b ? 0 : 1);
    }
}
